package gdma.hqdes.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import gdma.hqdes.bean.UnitScoreArg;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UnitScoreArgMapper extends BaseMapper<UnitScoreArg> {

    @Select("select a.* from unit_score s, unit_score_arg a where s.id=a.score_id and s.project_id=#{projectId} and s.unit_id=#{unitId}")
    List<UnitScoreArg> selectUnitScoreArgs(long projectId, long unitId);

    @Delete("delete from unit_score_arg where score_id=#{scoreId}")
    int deleteByScoreId(long scoreId);

}
